package com.keyancompany.zhongbaopingtai.utils;

import android.text.TextUtils;
import android.widget.EditText;
import android.widget.TextView;

/**
 * Created by firefox on 2016/6/3.
 */
public class EditTextUtils {

    public static String getEditTextValue(EditText targettText) {
        if (targettText.getText() == null) {
            return null;
        }
        String valueText = targettText.getText().toString();
        if (TextUtils.isEmpty(valueText)) {
            return null;
        }

        return valueText;
    }

    public static String getTextViewValue(TextView targettText) {
        if (targettText.getText() == null) {
            return null;
        }
        String valueText = targettText.getText().toString();
        if (TextUtils.isEmpty(valueText)) {
            return null;
        }

        return valueText;
    }
}
